package com.gusha.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.math.BigInteger;
import java.util.List;

import com.gusha.model.SysAdmin;
import com.gusha.model.User;


/**
 * @Created：2018-11-06 14:11:32
 * @Author LightSound的代码生成器
 * @Description:UserDao接口
 */
@Repository
public interface UserDao extends JpaRepository<User,BigInteger>,JpaSpecificationExecutor<User> {

	User findByPhone(String phone);

	User findByUserName(String userName);

	User findByCardNo(String cardNo);

	List<User> findAllByUserType(int userDls);

	List<User> findAllByUserTypeAndBelongId(int i, BigInteger bigInteger);

	List<User> findAllByUserTypeOrUserType(int userYwy, int userYybywy);
	
	User findByUserNameAndPassword(String userName, String md5Code);

	User findAllById(BigInteger bigInteger);

	List<User> findAllByUserNameOrPhone(String str,String str1);

	User findByPhoneAndPassword(String userName, String md5Code);


}
